<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@include file="WEB-INF/jspf/header.jspf" %>
<%@page import="java.util.Collection"%>
<%@page import="java.util.Iterator"%>
<%@page import="java.net.URLEncoder"%>
<%@page import="java.io.UnsupportedEncodingException"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <style type="text/css" media="screen">
            @import url( style2.css );
        </style>
        <title>Search Results</title>
    </head>
    <body>
    <h2>Search Results</h2>
    <table width="100%" cellpadding="0" cellspacing="0" border="0">
<% 
   Collection doclist = (Collection)session.getAttribute("doclist");
   Document doc_tmp =null;
   Iterator i = doclist.iterator();
   String tmp = null;
   
  
   if ( !doclist.isEmpty()){
       
       while(i.hasNext()){
           doc_tmp = (Document)i.next();
%>
       <tr>           
        <td>
<a href="document.do?action=more_info&id=<%=doc_tmp.getId()%>"><%=doc_tmp.getFilename()%></a> - <%=doc_tmp.getSummary()%> <br>

        </td>
       </tr>    
       <%      
       }
              
%></table>
<% } else { %>
<p>0 Search results found. Try refining your search keywords.</p>
<% } %>
    </body>
</html>